package com.fangs.lunbotu;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fangs.lunbotu.banner.BannerPage;


public class PointQuickAdapter extends BaseQuickAdapter<BannerPage, BaseViewHolder> {


    private int selectedPosition = 0;

    public void setSelectedPosition(int position) {
        selectedPosition = position;
    }

    public PointQuickAdapter() {
        super(R.layout.rl_item_point);
    }

    @Override
    protected void convert(BaseViewHolder helper, BannerPage item) {
        helper.setImageResource(R.id.view_point, selectedPosition ==
                helper.getAdapterPosition() ? R.drawable.bg_solid_000000_w18_h3 : R.drawable.bg_solid_ffffff_w9_h3);
    }
}
